package cn.anecansaitin.whimsy.client.sound;

import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.sounds.SoundInstance;
import net.minecraft.client.sounds.SoundManager;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class ModSoundSystem {
    private final Map<UUID, SoundInstance> sounds = new HashMap<>();

    public void tick() {
        SoundManager soundManager = Minecraft.getInstance().getSoundManager();
        //移除不活跃的声音
        sounds.entrySet().removeIf(entry -> !soundManager.isActive(entry.getValue()));
    }
//    private void sf() {
//        Minecraft.getInstance().getSoundManager().isActive()
//    }
}
